package org.jetlinks.community.mstn.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * @author zhengzuowei
 */
@Getter
@Setter
public class MstnMenuAssetAccess implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "支持类型ID")
    private String supportId;

    @Schema(description = "类型名称")
    private String name;

    @Schema(description = "说明")
    @Deprecated
    private boolean enabled;

    @Schema(description = "授权")
    private boolean granted;

    public static MstnMenuAssetAccess of(String supportId, String name , Boolean enabled , Boolean granted) {
        MstnMenuAssetAccess assetAccess = new MstnMenuAssetAccess();
        assetAccess.supportId = supportId;
        assetAccess.name = name;
        assetAccess.enabled = enabled;
        assetAccess.granted = granted;
        return assetAccess;
    }

}
